package com.wl.mybootwork3.entity;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

/**
 * @author wl
 * @version 1.0
 * @date 2022/6/13
 * @description:
 */
@Data
//组件的注解 将当前的类交由spring管理
@Component
//配置组件的注解使用 将该类中的属性前面加上my.user  例如:my.user.username  可在配置文件中给每个类中的属性赋值
@ConfigurationProperties(prefix = "my.user")
public class User {

    private String username;

    private Integer age;

    private Double money;

    private List<String> list;

    private Set<String> set;

    private Map<String,Object> map;

    private Properties properties;

    private String[] array;
}
